package cn.lili.modules.payment.client;

import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.payment.entity.dos.LiUserPointsWithdraw;
import cn.lili.modules.payment.entity.dos.PaymentSubsidies;
import cn.lili.modules.payment.entity.dos.RefundLog;
import cn.lili.modules.payment.entity.dto.*;
import cn.lili.modules.payment.entity.vo.OutOrderLogVO;
import cn.lili.modules.payment.fallback.LiUserPointsWithdrawFallback;
import cn.lili.modules.payment.fallback.PaymentFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 物流配置客户端
 *
 * @author Chopper
 * @version v1.0
 * 2021-11-08 09:52
 */
@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.PAYMENT_SERVICE, contextId = "pointsWithdraw", fallback = LiUserPointsWithdrawFallback.class)
public interface LiUserPointsWithdrawClient {

    /**
     * 提现
     *
     * @param pointsWithdraw 提现参数
     * @return 提现结果
     */
    @PostMapping("/feign/payment/withdraw")
    LiUserPointsWithdraw saveWithdraw(@RequestBody LiUserPointsWithdraw pointsWithdraw);

    @GetMapping("/getById")
    LiUserPointsWithdraw getById(@RequestParam String id);

    @PostMapping("/updateById")
    Boolean updateById(@RequestBody LiUserPointsWithdraw liUserPointsWithdraw);
}
